1. Field of the Invention
The present invention relates to a USB device, and more particularly, to a USB device with a clock calibration function and a method for calibrating reference clocks of the USB device.
2. Description of the Prior Art
Universal Serial Bus (USB) is a standard for peripheral devices. It began development in 1994 by a group of seven companies: Compaq, DEC, IBM, Intel, Microsoft, NEC and Nortel. In general, the USB supports the following signaling rates, including: a low-speed mode having a transfer rate of 1.5 Mbits/s being defined by USB 1.0 specification, a full-speed mode having a transfer rate of 12 Mbits/s being the basic USB data rate defined by USB 1.1 specification, a high-speed mode having a transfer rate of 480 Mbits/s being defined by USB 2.0 specification, and a super-speed mode having a transfer rate of 5.0 Gbits/s being defined by USB 3.0 specification.
Nowadays, an embedded oscillator (EMOSC) is adopted for a USB device operating under the USB high-speed mode (having a transfer rate of 480 Mbits/s) and the USB full-speed mode (having a transfer rate of 12 Mbits/s) only. However, manufacturing process variation, the operating voltage variation and/or the operating temperature variation of the EMOSC usually result in a clock drift in the clock frequency of the EMOSC. During the initialization phase, a large clock drift may occur in the clock frequency of the EMOSC since the operating voltage and the operating temperature of the EMOSC cannot be obtained. In addition, the super-speed mode of USB 3.0 specification has a smaller clock drift tolerance than the full-speed mode and the high-speed mode of the USB 2.0 specification. For example, clock tolerance is 5.0 Gbits/s±300 ppm for the super-speed mode of USB 3.0 specification, while the clock tolerance is 480 Mbits/s±500 ppm for the high-speed mode of the USB 2.0 specification and 12.000 Mbits/s±2500 ppm for the full-speed mode of the USB 2.0 specification. When the EMOSC is employed for calibrating the reference clock of the USB device during the super-speed mode of USB 3.0 specification (5.0 Gbits/s), it may result in abnormal operations under USB 3.0 mode if the operating frequency of the reference clock is inaccurate and unstable during the initialization phase.
Hence, how to precisely and stably calibrate the reference clock of the USB device during different transfer modes (such as, the full-speed mode, the high-speed mode and the super-speed mode) has become an important topic for designers in this field.